package com.bjc.controller;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @program: servlet
 * @description:
 * @author: bjc
 * @create: 2021-08-18 20:46
 */
public class TwoServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        int money = 50;
        PrintWriter writer = resp.getWriter();
        //这里会把money的值当成ASCII码的值
//        writer.write(money);

        //实际开发过程中都是用writer.print方法写入数据
        writer.println(money);
    }
}
